home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.coast.net!torn!nott!uottawa!u637018
- From: u637018@csi.uottawa.ca (Daniel Lortie)
- Newsgroups: comp.lang.c
- Subject: how to use farmalloc() structures? HELP!!!
- Date: 19 Jan 1996 17:24:39 GMT
- Organization: Dept. of Computer Science, University of Ottawa
- Message-ID: <4dok4n$plc@mercury.cc.uottawa.ca>
- NNTP-Posting-Host: csia.csi.uottawa.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
-
- How can I use the farmalloc() function for allocating memory in
- a compact memory model, for a structure. This is what I tried
- but does not work on Turbo C
-
- This is what I use when using malloc (not far allocation - limited to 64k)
- (How would I use farmalloc() ???)
- struct dbllist {
- ...
- ...
- ...
- };
-
- typedef dbllist sched;
- typedef sched *psched;
-
- ...
- ...
-
- main(void)
- {
- psched newrec;
-
- newrec = (psched) malloc(sizeof(sched));
- ...
- ...
- }
-
- Any thoughts appreciated!!!
- Daniel Lortie
- u637018@csi.uottawa.ca
- Daniel@admin.coop.uottawa.ca
-
-